<!--#include("header.html")-->
<!--%import("css/issuetracker.css")-->
<!--%import("filter/insert_milestone.xml")-->

<!--// datepicker javascript plugin load -->
<!--%load_js_plugin("ui.datepicker")-->

<!--@if($milestone)-->
<form action="{Context::getRequestUri()}" method="post" onsubmit="return procFilter(this, insert_milestone)">
<input type="hidden" name="module_srl" value="{$module_srl}" />
<input type="hidden" name="milestone_srl" value="{$milestone->milestone_srl}" />
<!--@if($milestone->is_default=="Y")--><input type="hidden" name="is_default" value="Y" /><!--@end-->
<table cellspacing="0" class="rowTable">
<thead>
<tr>
    <th scope="col" class="wide"><div>{$lang->name} </div></th>
    <th scope="col"><div>{$lang->deadline} </div></th>
    <th scope="col"><div>{$lang->complete}</div></th>
    <th scope="col"><div>{$lang->completed_date}</div></th>
    <th scope="col"><div>{$lang->is_default}</div></th>
</tr>
</thead>
<tbody>
<tr>
    <td><input name="title" type="text" id="title" class="inputTypeText w200 lang_code" value="{$milestone->title}" /></td>
    <td>
        <input type="hidden" name="deadline" id="date_deadline" value="{$milestone->deadline}"/>
        <input type="text" class="inputDate" value="<!--@if($milestone->deadline)-->{zdate($milestone->deadline,'Y-m-d')}<!--@end-->" readonly="readonly" />
    </td>
    <td><input type="checkbox" value="Y" name="is_completed" <!--@if($milestone->is_completed == 'Y')-->checked<!--@end--> /></td>
    <td>
        <input type="hidden" name="released_date" id="date_released_date" value="{$milestone->released_date}"/>
        <input type="text" class="inputDate" value="<!--@if($milestone->released_date)-->{zdate($milestone->released_date,'Y-m-d')}<!--@end-->" readonly="readonly" />
    </td>
    <td class="nowrap">
        <!--@if($milestone->is_default=='Y')-->
            {$lang->is_default}
        <!--@else-->
            <input type="checkbox" name="is_default" value="Y" />
        <!--@end-->
    </td>
</tr>
<tr>
    <td colspan="4"><textarea name="description" class="inputTypeTextArea fullWidth" />{$milestone->description}</textarea></td>
    <td>
        <span class="button strong black"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
    </td>
</tr>
<tr>
</tr>
</tbody>
</table>
</form>


<script type="text/javascript">
(function($){
    $(function(){
        var option = { gotoCurrent: false,yearRange:'-100:+10', onSelect:function(){

            $(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""))}
        };
        $.extend(option,$.datepicker.regional['{$lang_type}']);
        $(".inputDate").datepicker(option);
    });
})(jQuery);
</script>
<!--@end-->
